package cn.gene.timeyan.article.service;

import cn.gene.timeyan.common.restful.JsonPage;
import cn.gene.timeyan.common.restful.JsonResult;
import cn.gene.timeyan.pojo.article.dto.ArticleDTO;
import cn.gene.timeyan.pojo.article.dto.NewArticleDTO;
import cn.gene.timeyan.pojo.article.model.Article;
import cn.gene.timeyan.pojo.article.vo.ArticleVO;
import cn.gene.timeyan.pojo.article.vo.SimpleArticleVO;

import java.util.List;

/**
 * <p>
 * 鏂囩珷淇℃伅 服务类
 * </p>
 *
 * @author LWG
 * @since 2022-07-25
 */
public interface ArticleService  {
    /**
     * 分页查询所有分享信息
     * @param pageNum PageSize
     * @return 一页spu信息
     */

    JsonPage<Article> getShareByPage(Integer pageNum, Integer pageSize);
    Article selectByUserId(Long userId);
    Integer updateInfo(Long articleId,Long userId,Integer articleLike);

    ArticleVO articleDetail(ArticleDTO articleDTO);

    Article getAricleByAricleId(Long articleId);

    Long getUserIdByArticleId(Long articleId);

    void display(String id);

    void hide(String id);

    List<SimpleArticleVO> getArticleList(Long modelId);

    List<SimpleArticleVO> getArticleListNext(Long modelId,Integer page);

    JsonResult<List<SimpleArticleVO>> getUserArticleList(Long userId, Integer page);

    JsonResult<Void> addNewArticle(NewArticleDTO newArticleDTO);
}
